
$(function () {
    var href = location.href;
    // console.log(href);
    $.ajax({
        type: 'get',
        url: '/cart/queryCart',
        dataType: 'json',
        success: function (res) {
            if (res.error) {
                location.href = "./login.html?retURL=" + href;
            } else {
                console.log(res);
                $(".cart-cont").html(template('tmp', { list: res }));
            }

        }
    })
}) 